[package]
name = "{{{packageName}}}"
version = "{{{packageVersion}}}"
edition = "{{{packageEdition}}}"

[lib]
name = "{{{packageLibname}}}"
path = "src/lib.rs"

[features]
default = [ "tower-client-rls", "tower-trace" ]
actix-server = [ "actix" ]
actix-client = [ "actix", "actix-web-opentelemetry", "awc" ]
actix = [ "actix-web", "rustls" ]
tower-client-rls = [ "tower-client", "rustls_feat" ]
tower-client-tls = [ "tower-client", "hyper_tls_feat" ]
tower-client = [ "tower-hyper" ]
tower-hyper = [ "hyper", "tower", "tower-http", "http-body", "futures", "pin-project", "tokio" ]
hyper_tls_feat = [ "hyper-tls", "tokio-native-tls" ]
rustls_feat = [ "rustls", "webpki", "hyper-rustls" ]
tower-trace = [ "opentelemetry-jaeger", "tracing-opentelemetry", "opentelemetry", "opentelemetry-http", "tracing", "tracing-subscriber" ]

[dependencies]
serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = { version = "^2.4", features = ["serde"] }
async-trait = "0.1.73"
dyn-clonable = "0.9.0"
uuid = { version = "1.4.1", features = ["serde", "v4"] }
serde_urlencoded = "0.7"

# actix dependencies
actix-web = { version = "4.4.0", features = ["rustls-0_21"], optional = true }
actix-web-opentelemetry = { version = "0.17.0", optional = true }
awc = { version = "3.2.0", optional = true }

# tower and hyper dependencies
hyper = { version = "0.14.27", features = [ "client", "http1", "http2", "tcp", "stream" ], optional = true }
tower = { version = "0.4.13", features = [ "timeout", "util", "limit" ], optional = true }
tower-http = { version = "0.4.4", features = [ "trace", "map-response-body", "auth" ], optional = true }
tokio = { version = "1.32.0", features = ["full"], optional = true }
http-body = { version = "0.4.5", optional = true }
futures = { version = "0.3.28", optional = true }
pin-project = { version = "1.1.3", optional = true }

# SSL
rustls = { version = "0.21.12", optional = true, features = [ "dangerous_configuration" ] }
rustls-pemfile = "1.0.3"
webpki = { version = "0.22.2", optional = true }
hyper-rustls = { version = "0.24.1", optional = true }
hyper-tls = { version = "0.5.0", optional = true }
tokio-native-tls = { version = "0.3.1", optional = true }

# tracing and telemetry
opentelemetry-jaeger = { version = "0.21.0", features = ["rt-tokio-current-thread"], optional = true  }
tracing-opentelemetry = { version = "0.23.0", optional = true }
opentelemetry = { version = "0.22.0", optional = true }
opentelemetry-http = { version = "0.11.1", optional = true }
tracing = { version = "0.1.37", optional = true }
tracing-subscriber = { version = "0.3.18", optional = true }
